class TreeController < ApplicationController
	layout "board"

  def index
		@user = params[:id]
		@person = User.find_by_userName(@user)
  end
	
	def move
		domain = Domain.find_by_id(params[:id])
		if(domain.hit == nil)
			domain.hit = 1
		else
			domain.hit += 1
		end
	domain.save
	redirect_to("#{domain.fullDomain}")
	end

	def main
		users = User.find(:all)
		@domains_top10 = Domain.find_by_sql("select DISTINCT * from domains limit 10")
		
		if @domains_top10
			
		end
	end

end